package palindrome;

public class Main {
    public static void main(String[] args) {
        System.out.println("Palindrome numbers between 11 and 10000 are:");
        for (int i = 11; i <= 10000; i++) {
            if (isPalindrome(i)) {
                System.out.print(i + " ");
            }
        }
    }

    // Helper method to check if a number is a palindrome
    public static boolean isPalindrome(int number) {
        int originalNumber = number;
        int reversedNumber = 0;
        while (number > 0) {
            int lastDigit = number % 10;
            reversedNumber = reversedNumber * 10 + lastDigit;
            number /= 10;
        }

        return originalNumber == reversedNumber;
    }
}
